<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
</html>
<script>
	var arr = [1, 3, 10, 2, 34, 5, 12];
//	arr.sort(sortNum);
//	arr.forEach(sortNum)
	arr.sort(sortNum)
	
	
	function sortNum(a, b){
		return a - b;
	}
	
	console.log(arr)
</script>